package com.weijian.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OpenApiConfig {

    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("智能助手 API")
                        .version("v1.0")
                        .description("基于 Springdoc 的接口文档")
                        .contact(new Contact().name("技术支持").email("support@example.com"))
                )
                .externalDocs(new io.swagger.v3.oas.models.ExternalDocumentation()
                        .description("详细说明文档")
                        .url("https://docs.example.com"));
    }
}
